package com.shenzhen.group.common.entity;

import com.shenzhen.group.common.card.Card;
import lombok.Data;

import javax.annotation.PostConstruct;
import java.util.List;

/**
 * 手牌组基类
 * @author 周赛波
 * @version v1.0.0
 * @date 2021/9/20 12:04
 */
@Data
public abstract class HandCardGroupBase {
    protected int num;
    protected String remark;
    protected List<Card> cards;

    @PostConstruct
    public void initCards() {

    }


    public String displayCard() {
        StringBuilder res = new StringBuilder();
        for (Card card : cards) {
            res.append(card.display());
            res.append("  ");
        }
        return res.toString();
    }

}
